package com.example.security.mapper;

import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.security.entity.SysPermission;

import java.util.List;

/**
 * @Description  
 * @author ZhiPeng.Lin
 * @Date 2022-02-10 
 */
@Mapper
public interface SysPermissionMapper extends BaseMapper<SysPermission> {

    /**
     * 查询用户权限.
     * @param userId
     * @return
     */
    List<SysPermission> selectByUser(Integer userId);

    /**
     * 查询具体某个接口的权限
     *
     * @param path 接口路径
     * @return
     */
    List<SysPermission> selectListByPath(String path);
}
